import React, { Component } from 'react';
import DemoChild1 from '../7.1.1父传子props/Child1';
class DemoParentToChild extends Component {
    state = { 
      role: 'admin',
      userinfo: {
        name: 'zhangsan',
        age: 18
      }
    } 
    render() { 
        return (
         <div className='parent'>
           <h3>7.1 父传子</h3>
           <h4>7.1.1 父传子-props</h4>
           <DemoChild1 role={this.state.role} userinfo={this.state.userinfo} />
         </div>
        );
    }
}
 
export default DemoParentToChild;